From bf61370923466884160ae7a7ee6600f1baff4271 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 22 Oct 2025 16:32:23 +0200 Subject: [PATCH] config: properly set log level from uci MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The condition to set the log level from the uci config if it hadn't been set from the command line should be inverted to work properly. Signed-off-by: Álvaro Fernández Rojas --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 6a33b7c..3e916ad 100644 --- a/src/config.c +++ b/src/config.c @@ -453,7 +453,7 @@ static void set_config(struct uci_section *s) if ((c = tb[ODHCPD_ATTR_LOGLEVEL])) { int log_level = (blobmsg_get_u32(c) & LOG_PRIMASK); - if (config.log_level != log_level && config.log_level_cmdline) { + if (config.log_level != log_level && !config.log_level_cmdline) { config.log_level = log_level; if (config.log_syslog) setlogmask(LOG_UPTO(config.log_level)); -- 2.30.2